home *** CD-ROM | disk | FTP | other *** search
- property mySprite, myType, myName, myNameDown, myNameOver, myNameInactive, Active, ancestor, tileSprite
-
- on beginSprite me
- global gActorListMan
- mySprite = me.spriteNum
- myName = (the member of sprite mySprite).name
- myNameDown = word 1 of myName && "down"
- myNameOver = word 1 of myName && "over"
- myNameInactive = word 1 of myName && "Inactive"
- Active = 1
- lookForToolTip = 1
- ancestor = new(script("FourStatebuttonActions"), lookForToolTip)
- myType = #purchaseButton
- registerSprite(gActorListMan, mySprite)
- end
-
- on mouseUp me
- global gClickSprite, gConMan
- if voidp(tileSprite) then
- tileSprite = sendAllSprites(#sendSpriteNum, #tileSprite)
- end if
- if not Active then
- exit
- end if
- if gClickSprite = mySprite then
- doButtonUpClick(myType, 1)
- sendSprite(tileSprite, #turnOn)
- end if
- end
-
- on clearActorList me
- if Active then
- set the member of sprite the mySprite of me to member(myName)
- else
- set the member of sprite the mySprite of me to member(myNameInactive)
- end if
- end
-
- on endSprite me
- global gActorListMan
- unRegisterSprite(gActorListMan, mySprite)
- end
-